In order to detect a communication error, a portable electronic device such as an IC card may use an error detection code (EDC) in data communications with an external device. Conventionally, an IC card gives the EDC to the whole message, and it repeats a retransmitting process until the external device of a transmission destination can confirm the justification of the message. However, when the message is large in data size, the IC card needs to retransmit the large data, and a communication time and the whole processing time may become long.
In a conventional technology, when a communication error arises when the message is large in data size, the IC card needs to retransmit the large data and thereby the communication time and the whole processing time become long.